<?php
include('../config.php');
//获取值，接受前段的数据
$name=$_GET['name'];
$prise=$_GET['prise'];
$num=$_GET['num'];

//传给数据库更改 insert into 
$sql="insert into shop (name,prise,num) values ('$name',$prise,$num)";
//资源类型
$res =mysql_query($sql);

if($res){
    echo json_encode(array(
        "code"=>200,
        "body"=>array(
            "msg"=>"添加成功"
        )
        ));
}else{
    echo json_encode(array(
        "code"=>400,
        "body"=>array(
            "msg"=>"添加失败，再来一次"
        )
        ));
}


?>